#include<stdio.h>
#include<string.h>

int win();

int lose();

int main()
{
    int n, i, j, flag = 0;
    scanf("%d", &n);

    int randNum[n];
    for(i = 0; i < n; i++)
    {
        scanf("%d", &randNum[i]);
    }

    i = 0;
    while(1)
    {
        if(i == n)
        {
            i = 0;
        }
        int win_nums = randNum[i];
        
        //win 'randNum[i]' times
        for(j = 0; j < win_nums; j++)
        {
            flag = win();
            if(flag)
            {
                break;
            }
        }

        //lose 1 times
        flag = lose();
		
		if(flag)
        {
            break;
        }
        
        i++;
    }
}

int win()
{
	char rival[10] = {0};
	scanf("%s", rival);
	
    if(strcmp(rival, "JianDao") == 0)
    {
        printf("ChuiZi\n");
        return 0;
    }
    if(strcmp(rival, "ChuiZi") == 0)
    {
        printf("Bu\n");
        return 0;
    }
    if(strcmp(rival, "Bu") == 0)
    {
        printf("JianDao\n");
        return 0;
    }
    if(strcmp(rival, "End") == 0)
    {
    	return 1;
    }
}

int lose()
{
	char rival[10];
	scanf("%s", rival);
	
    if(strcmp(rival, "JianDao") == 0)
    {
        printf("Bu\n");
        return 0;
    }
    if(strcmp(rival, "ChuiZi") == 0)
    {
        printf("JianDao\n");
        return 0;
    }
    if(strcmp(rival, "Bu") == 0)
    {
        printf("ChuiZi\n");
        return 0;
    }
    if(strcmp(rival, "End") == 0)
    {
    	return 1;
    }
}
